<%@ page import="com.lsk.util.UtilUUID" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018-12-21
  Time: 下午 2:03
  ajax加载轮播图
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <title>Title</title>
    <script src="../../js/jquery-3.3.1.min.js" charset="utf-8"></script>
    <script src="../../js/cookie/jquery.cookie.js" charset="utf-8"></script>
    <script src="../../layui-v2.4.5/layui/layui.js" charset="utf-8"></script>
    <script src="/js/layui/form_verify.js"></script>
    <link rel="stylesheet" href="../../layui-v2.4.5/layui/css/layui.css" media="all">
</head>
<body>
<div class="layui-carousel" id="test10">
    <div carousel-item="">
        <c:forEach items="${list}" var="imgList">
            <div><img src="${imgList.path}?version=<%=UtilUUID.getUUID()%>" style="width: 100%;height: 100%" onclick="settingImg('${imgList.id}')"></div>
        </c:forEach>
    </div>
</div>

<script>

    function settingImg(id) {
        console.log("点击设置");
        layer.open({
            type: 2,
            title:"图片详情",
            shadeClose:true,
            offset: '0px',
            area: ['60%', '90%'],
            content: '/shop/settingImg?id='+id,
            end:function () {
                loadImg();
            }
        });
    }


</script>

</body>
</html>